package com.hedl.testClass;

import java.util.Arrays;

public class Study {
    public void test(Integer []arr){
        for (int i = 0;i < arr.length-1;i++){
            for (int j = 0;j < arr.length-1-i;j++){
                if (arr[j] > arr[j+1]){
                    Integer temp;
                    temp = arr[j];
                    arr[j] = arr[j+1];
                    arr[j+1] = temp;
                }
            }
        }
    }
    public static void main(String[] args) {
        Integer[] a = {4,2,86,334,23,99,23,13,7};

        new Study().test(a);

        System.out.println(Arrays.toString(a));
    }
}
